using System;
using System.Collections.Generic;
using System.Text;

namespace GymManager.Persistence.VO
{
    /// <summary>
    /// Class representing the modality value object
    /// </summary>
    public class Modality : IEquatable<Modality>
    {
        #region Attributes
        private Int32 _id;
        private String _description;        
        private Boolean _isActive;
        private Boolean _isScheduleMandatory;
        private Nullable<Int32> _maxNumberOfStudentsAllowed;
        private IList<ModalityPlan> _modalityPlanList;
        private Nullable<Int32> _scheduleColor;
        #endregion

        #region Properties
        public Int32 Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public Nullable<Int32> MaxNumberOfStudentsAllowed
        {
            get { return _maxNumberOfStudentsAllowed; }
            set { _maxNumberOfStudentsAllowed = value; }
        }

        public IList<ModalityPlan> ModalityPlanList
        {
            get { return _modalityPlanList; }
            set { _modalityPlanList = value; }
        }
        
        public Boolean IsActive
        {
            get { return _isActive; }
            set { _isActive = value; }
        }

        public Boolean IsScheduleMandatory
        {
            get { return _isScheduleMandatory; }
            set { _isScheduleMandatory = value; }
        }

        public String Description
        {
            get { return _description; }
            set { _description = value; }
        }

        public Nullable<Int32> ScheduleColor
        {
            get { return _scheduleColor; }
            set { _scheduleColor = value; }
        }
        #endregion

        #region IEquatable<Modality> Members
        /// <see cref="IEquatable#Equals(Modality)"/>
        public bool Equals(Modality other)
        {
            if (other != null)
            {
                return this.Id.Equals(other.Id);
            }
            else
            {
                return false;
            }
        }

        #endregion
    }
}
